import React from 'react';
import { HashRouter, Route, Switch} from 'react-router-dom';
import Flight from "../Flight";
import Flow_all  from "../pages/Flow_all";
import Flow_ciyun  from "../pages/Flow_ciyun";
import Flow_out  from "../pages/Flow_out";
import Delay from "../pages/Delay";
import Detail from "../pages/Detail";
import TopFlight_f  from "../pages/TopFlight_f";
import TopFlight_c  from "../pages/TopFlight_c";
import Sum  from "../pages/Sum";
import Age  from "../pages/Age";
import Redirect from "react-router-dom/es/Redirect";

class routes extends React.Component{
    render() {
        return (
            <HashRouter>
                <Switch>
                    <Route exact path="/" component={Flight}/>
                    <Route exact path="/Flow_all" component={Flow_all}/>
                    <Route exact path="/Flow_ciyun" component={Flow_ciyun}/>
                    <Route exact path="/Flow_out" component={Flow_out}/>
                    <Route exact path="/Delay" component={Delay}/>
                    <Route exact path="/Detail" component={Detail}/>
                    <Route exact path="/TopFlight_f" component={TopFlight_f}/>
                    <Route exact path="/TopFlight_c" component={TopFlight_c}/>
                    <Route exact path="/Sum" component={Sum}/>
                    <Route exact path="/Age" component={Age}/>
                    <Redirect to='/Flight' />
                </Switch>
            </HashRouter>
        );
    }
}
export default routes;